package com.ruoyi.es.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.FieldType;

import java.math.BigDecimal;
import java.util.Date;

@Data
@IndexName
public class EsValueInfo {

    @IndexId
    private String id;

    private Long deviceId;

    private Long deptId;

    private String deviceCode;

    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date timeSample;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date timeUpload;

    /**
     * 上报时间戳
     */
    private Long timestamp;

    //设置开度
    private int setOpening;
    //当前开度
    private int valveOpening;
    private BigDecimal tempIntake;
    private BigDecimal tempReturn;
    //工作模式
    private String workMode;
    private int sampleCycle;
    private int uploadCycle;
    //信号
    private int rssi;
    //电量
    private double batteryVoltage;
    private String verSw;

    private int lockState;
    private String nodeId;
    //设置温度
    private BigDecimal tempSet;
    //室内温度
    private BigDecimal tempIndoor;
}
